-
Notifications
You must be signed in to change notification settings - Fork 904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(agents-api): Fixed tests for models and queries #449
Conversation
Signed-off-by: Diwank Tomer <[email protected]>
* **agents-api/tests/test_agent_queries.py** - Update import statements to reflect the new location of the model functions - Update function calls to the new location of the model functions - Add `from agents_api.autogen.openapi_model import Agent` back * **agents-api/tests/test_docs_queries.py** - Update import statements to reflect the new location of the model functions * **agents-api/tests/test_entry_queries.py** - Update import statements to reflect the new location of the model functions * **agents-api/tests/test_execution_queries.py** - Update import statements to reflect the new location of the model functions * **agents-api/tests/test_session_queries.py** - Update import statements to reflect the new location of the model functions * **agents-api/tests/test_task_queries.py** - Update import statements to reflect the new location of the model functions * **agents-api/tests/test_tool_queries.py** - Update import statements to reflect the new location of the model functions * **agents-api/tests/test_user_queries.py** - Update import statements to reflect the new location of the model functions
…eries.py` Update tests in `test_agent_queries.py` to use existing models and queries * Replace `agent.create_agent` with `create_agent` * Replace `agent.delete_agent` with `delete_agent` * Replace `agent.get_agent` with `get_agent` * Replace `agent.list_agents` with `list_agents` * Replace `agent.update_agent` with `update_agent` Update tests in `test_session_queries.py` to use existing models and queries * Import `Session` from `agents_api.autogen.openapi_model` Update tests in `test_task_queries.py` to use existing models and queries * Replace `CreateTaskRequest`, `DeleteTaskRequest`, `GetTaskRequest`, `ListTasksRequest`, `UpdateTaskRequest` with dictionaries Update tests in `test_tool_queries.py` to use existing models and queries * Replace `FunctionDef` with dictionaries Update tests in `test_user_queries.py` to use existing models and queries * Replace `agents_api.autogen.openapi_model` with `agents_api.autogen.Users`
Signed-off-by: Diwank Tomer <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Reviewed everything up to ad27ec0 in 1 minute and 3 seconds
More details
- Looked at
3034
lines of code in26
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. agents-api/agents_api/models/agent/delete_agent.py:29
- Draft comment:
The HTTP status code for "developer not found or doesn't own resource" should be 404 (Not Found) instead of 403 (Forbidden) as it directly relates to the inability to locate a resource (developer or agent) specified by the client.
detail="developer not found or doesnt own resource", status_code=404
- Reason this comment was not posted:
Confidence of 0% on close inspection, compared to threshold of 50%.
2. agents-api/agents_api/models/agent/get_agent.py:24
- Draft comment:
The HTTP status code for "developer not found or doesn't own resource" should be 404 (Not Found) instead of 403 (Forbidden) as it directly relates to the inability to locate a resource (developer or agent) specified by the client.
detail="developer not found or doesnt own resource", status_code=404
- Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_JHxoYrURlNmRAKNo
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
DeleteDocRequest
import and related tests fromtest_docs_queries.py
Summary:
Refactored and relocated test files for
agents-api
, updated model function locations, and modified exception handling and query construction.Key points:
DeleteDocRequest
import and related tests fromagents-api/agents_api/models/docs/test_docs_queries.py
.create_agent.py
,delete_agent.py
,get_agent.py
, and others.delete_doc.py
,create_entries.py
,create_execution.py
, and others.agents-api/tests/fixtures.py
to support new test setup.Generated with ❤️ by ellipsis.dev